Optimal. Leaf size=74 \[ -\frac{\cos (c+d x)}{2 d (a+b) \left (a-b \cos ^2(c+d x)+b\right )}-\frac{\tanh ^{-1}\left (\frac{\sqrt{b} \cos (c+d x)}{\sqrt{a+b}}\right )}{2 \sqrt{b} d (a+b)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0539592, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3186, 199, 208} \[ -\frac{\cos (c+d x)}{2 d (a+b) \left (a-b \cos ^2(c+d x)+b\right )}-\frac{\tanh ^{-1}\left (\frac{\sqrt{b} \cos (c+d x)}{\sqrt{a+b}}\right )}{2 \sqrt{b} d (a+b)^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3186
Rule 199
Rule 208
Rubi steps
\begin{align*} \int \frac{\sin (c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{1}{\left (a+b-b x^2\right )^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac{\cos (c+d x)}{2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{1}{a+b-b x^2} \, dx,x,\cos (c+d x)\right )}{2 (a+b) d}\\ &=-\frac{\tanh ^{-1}\left (\frac{\sqrt{b} \cos (c+d x)}{\sqrt{a+b}}\right )}{2 \sqrt{b} (a+b)^{3/2} d}-\frac{\cos (c+d x)}{2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}\\ \end{align*}
Mathematica [C] time = 0.274156, size = 149, normalized size = 2.01 \[ \frac{-\frac{2 \cos (c+d x)}{2 a-b \cos (2 (c+d x))+b}+\frac{\tan ^{-1}\left (\frac{\sqrt{b}-i \sqrt{a} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{-a-b}}\right )}{\sqrt{b} \sqrt{-a-b}}+\frac{\tan ^{-1}\left (\frac{\sqrt{b}+i \sqrt{a} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{-a-b}}\right )}{\sqrt{b} \sqrt{-a-b}}}{2 d (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.072, size = 68, normalized size = 0.9 \begin{align*}{\frac{1}{d} \left ({\frac{\cos \left ( dx+c \right ) }{ \left ( 2\,a+2\,b \right ) \left ( b \left ( \cos \left ( dx+c \right ) \right ) ^{2}-a-b \right ) }}-{\frac{1}{2\,a+2\,b}{\it Artanh} \left ({b\cos \left ( dx+c \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.8257, size = 635, normalized size = 8.58 \begin{align*} \left [\frac{{\left (b \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt{a b + b^{2}} \log \left (-\frac{b \cos \left (d x + c\right )^{2} - 2 \, \sqrt{a b + b^{2}} \cos \left (d x + c\right ) + a + b}{b \cos \left (d x + c\right )^{2} - a - b}\right ) + 2 \,{\left (a b + b^{2}\right )} \cos \left (d x + c\right )}{4 \,{\left ({\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} d \cos \left (d x + c\right )^{2} -{\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} d\right )}}, \frac{{\left (b \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt{-a b - b^{2}} \arctan \left (\frac{\sqrt{-a b - b^{2}} \cos \left (d x + c\right )}{a + b}\right ) +{\left (a b + b^{2}\right )} \cos \left (d x + c\right )}{2 \,{\left ({\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} d \cos \left (d x + c\right )^{2} -{\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} d\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13186, size = 107, normalized size = 1.45 \begin{align*} \frac{\arctan \left (\frac{b \cos \left (d x + c\right )}{\sqrt{-a b - b^{2}}}\right )}{2 \, \sqrt{-a b - b^{2}}{\left (a + b\right )} d} + \frac{\cos \left (d x + c\right )}{2 \,{\left (b \cos \left (d x + c\right )^{2} - a - b\right )}{\left (a + b\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]